package com.common.pojo.vo;


import java.util.List;

/**
 * @Brief 后端分页数据包装类
 * @Author chenyl
 * @Date 2021-12-07
 * @Version 1.0.0
 */
public class PageVO<T> {
    /**
     * 总条数
     */
    private Long totalCount;
    /**
     * 每页条数
     */
    private int pageSize;
    /**
     * 总页数
     */
    private Long totalPage;
    /**
     * 当前页
     */
    private int curPage;
    /**
     * 返回的数据
     */
    private List<T> data;

    public Long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Long totalCount) {
        this.totalCount = totalCount;
    }

    public Long getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Long totalPage) {
        this.totalPage = totalPage;
    }

    public int getCurPage() {
        return curPage;
    }

    public void setCurPage(int curPage) {
        this.curPage = curPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public PageVO() {
    }

    public PageVO(Long totalCount, int pageSize, int curPage, List<T> data) {
        this.totalCount = totalCount;
        this.pageSize = pageSize;
        this.curPage = curPage;
        this.data = data;
    }

    @Override
    public String toString() {
        return "{totalCount:" + totalCount +
                ",totalPage:" + totalPage +
                ",curPage:" + curPage +
                ",pageSize:" + pageSize +
                ",data:" + data +
                "}";
    }
}
